package com.qf.fc.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qf.fc.entity.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 用户表(User)表数据库访问层
 *
 * @author makejava
 * @since 2024-09-16 22:55:53
 */
public interface UserDao extends BaseMapper<User> {

    @Update("update t_user set password=#{pass},update_time=now() where phone=#{phone}")
    boolean updatePass(@Param("pass") String pass, @Param("phone") String phone);

    @Select("select password from t_user where phone=#{phone}")
    String findPass(@Param("phone") String phone);
}

